The present invention relates to a method of and an apparatus for activating a cache during an online operation in a disk system such as a magnetic disk or an optical disk incorporating the cache and, more particularly, to a method of and an apparatus for making it possible to perform maintenance on the cache and automatic closure and recovering of the cache during online operation thereof.
In a computer system of the type described, a reference by a processor to a memory has the following characteristics:
(a) References of several times to common information; and PA0 (b) Reference to information stored nearby when certain information is referred to. Thanks to these characteristics, a memory having apparently high speed and large capacity can be realized by combining a memory of high speed and small capacity and a memory of low speed and large capacity in a two hierarchy arrangement. PA0 (a) When the cache is in an ordinary status, it is switched whether or not the cache is to be used; and PA0 (b) The use of the cache is prohibited when a failure occurs around the cache.
What is used with most frequency as an auxiliary memory is a magnetic disk unit, which has an access time as large 10.sup.5 times that of the main memory. In order to reduce this gap between the access times, there is provided a buffer memory (which is called the "disk cache" and will be shortly referred to as the "cache") for the magnetic disk to realize a memory having the aforementioned apparently high speed and large capacity.
Such disk controllers having a cache are disclosed in the following references concerning control relating to the cache which may be performed during online operation:
The detailed contents of these operations are disclosed in Japanese Patent Laid-Open No. 60-79447.
In the disk controller having the cache according to this publication, the control method relating to the cache which is activatable during online operations has been incapable of executing a control in which the cache is used again after its use has been prohibited due to some failure. In order to replace the cache with a new cache or to initialize the cache, more specifically, the disk controller has to be brought into an off-line status to interrupt the disk input/output process.
This raises a problem that the input/output process of the disk itself is stopped during the maintenance of the cache.
In the prior system, moreover, the following problems arise for the maintenance during online operations.
The time period for initializing the changed cache is far longer than the allowance time after a request for input/output process has been issued from a host computer at a higher rank before the disk controller returns a response of accepting the request. If the initialization is started exclusively by a certain processor in the disk controller, the storage path having been controlled by that processor cannot accept the request for the disk input/output process. As a result, it is impossible in fact to execute the maintenance without exerting serious influences upon the online process.
If a cache failure occurs, on the other hand, a control is carried out to prohibit the use of the cache. This prohibition is not limited to the instant when the hardware failure of the cache itself occurs. Even if no failure occurs in the hardware of the cache itself, the processor may malfunction in the course of a series of write sequences in the cache to break the power temporarily. If the contents written in the cache cannot be secured, the use of the cache is likewise prohibited. Since, in this case, there is no failure in the hardware of the cache itself, the cache could be reused if initialized. For this reuse, the maintenance has to be carried out with the power line being off.